package com.app.manage.moudles.confs.dao;

import com.app.manage.moudles.confs.entity.TGroup;
import com.app.manage.moudles.confs.entity.TGroupRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TGroupRelationDao extends BaseMapper<TGroupRelation> {

    /**
     * 查询关联的id
     * @param groupId
     * @param type
     * @return
     */
    List<Integer>  selectRelationIds(@Param("groupId") Integer groupId,@Param("type") Integer type);

    /**
     * 查询分组id
     * @param relId
     * @param type
     * @return
     */
    Integer selectGroupId(@Param("relId") Integer relId,@Param("type") Integer type);

    /**
     * 查询分组名称
     * @param relId
     * @param type
     * @return
     */
    String selectGroupName(@Param("relId") Integer relId,@Param("type") Integer type);


    List<TGroup> selectGroupByRelation(Integer type);
}
